<div class="container-fluid">
    <div class="row">
        <div class="col-md-12">
            <div class="input-group">
                <button class="btn btn-info" id="btnSqlFormatter" title="基于开源项目 sql-formatter 本地提供格式化">本地格式化</button>
                <button class="btn btn-warning" id="btnPgFormatter" title="基于开源项目 pgFormatter 服务端提供格式化，效果更佳">服务端格式化</button>
            </div>
        </div>
        <div class="col-md-12 mt-2">
            <div id="editor" class="border overflow-hidden position-relative">
                <i class="fa fa-arrows-alt fa-fw me-full-btn" title="Switch the full screen"></i>
            </div>
        </div>
    </div>
</div>

<script>
    function AutoHeight() {
        var ch = $(window).height() - $('#editor').offset().top - 15;
        $('#editor').css('height', Math.max(200, ch));
    }
    AutoHeight();
</script>

<partial name="_PartialQuote" model="@("sql-formatter.js,monaco-editor")" />

<script src="/js/sqlformatter.js" asp-append-version="true"></script>